<!--
 * @Author: g05047
 * @Date: 2021-06-11 11:07:14
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-06-30 10:07:27
 * @Description: file content
-->
<template>
  <page-layout class="authority">
    <a-tabs :default-active-key="key" @change="callback">
      <a-tab-pane key="1" tab="角色管理">
        <role :apply="key==1?true:false"></role>
      </a-tab-pane>
      <a-tab-pane key="2" tab="员工管理">
        <staff :apply="key==2?true:false"></staff>
      </a-tab-pane>
    </a-tabs>
  </page-layout>
</template>

<script>
import PageLayout from '@/layouts/PageLayout';
import role from './authorityManagement/roleManagement.vue';
import staff from './authorityManagement/staffManagement.vue';
export default {
  name: 'authorityManagement',
  components: {
    role,
    staff,
    PageLayout,
  },
  data () {
    return {
      key: '1',
    };
  },
  methods: {
    callback (key) {
      this.key = key;
    },
  },
};
</script>

<style scoped lang="less">
.authority {
  .ant-tabs.ant-tabs-top.ant-tabs-line {
    background: #fff;
  }

  /deep/ .ant-tabs-bar.ant-tabs-top-bar {
    margin: 0;
  }
}
</style>
